home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / include / fontdir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-15  |  2.3 KB  |  82 lines

  1. /***********************************************************
  2. Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  3. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  4.  
  5.                         All Rights Reserved
  6.  
  7. Permission to use, copy, modify, and distribute this software and its 
  8. documentation for any purpose and without fee is hereby granted, 
  9. provided that the above copyright notice appear in all copies and that
  10. both that copyright notice and this permission notice appear in 
  11. supporting documentation, and that the names of Digital or MIT not be
  12. used in advertising or publicity pertaining to distribution of the
  13. software without specific, written prior permission.  
  14.  
  15. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  16. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  17. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  18. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  19. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  20. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21. SOFTWARE.
  22.  
  23. ******************************************************************/
  24.  
  25. /* $XConsortium: fontdir.h,v 1.7 89/03/10 17:40:09 rws Exp $ */
  26.  
  27. #define True 1
  28. #define False 0
  29. typedef int Boolean;
  30.  
  31. #define NUL '\0'
  32.  
  33. #define FontDirFile "fonts.dir"
  34. #define AliasFile "fonts.alias"
  35. #define NoMatch -1
  36.  
  37. typedef struct _No_Such_Struct_ *Opaque;
  38.  
  39. typedef struct _FontFile {
  40.     char        *name;
  41.     Opaque        private;
  42.     Boolean        alias;
  43. } FontFileRec, *FontFile;
  44. #define NullFontFile ((FontFile) NULL)
  45.  
  46. typedef struct _FontName {
  47.     char        *name;
  48.     union {
  49.     int        index;        /* into FileEntry vector */
  50.     FontFile    ff;
  51.     } u;
  52. } FontNameRec, *FontName;
  53. #define NullFontName ((FontName) NULL)
  54.  
  55. typedef struct _FileEntry {
  56.     int            used;
  57.     int            size;
  58.     FontFile        ff;
  59. } FileEntry;
  60.  
  61. typedef struct _NameEntry {
  62.     int            used;
  63.     int            size;
  64.     FontName        fn;        /* always sorted */
  65. } NameEntry;
  66.  
  67. typedef struct _FontTable {
  68.     char        *directory;
  69.     FileEntry        file;
  70.     NameEntry        name;
  71. } FontTableRec, *FontTable;
  72. #define NullTable ((FontTable) NULL)
  73.  
  74. /* from fontdir.c */
  75.  
  76. extern int        AddFileEntry();
  77. extern Boolean        AddNameEntry();
  78. extern void        FreeFontTable();
  79. extern FontTable    MakeFontTable();
  80. extern Boolean        Match();
  81.  
  82.